3.62 \(\int \frac{(e+f x)^2 \left (A+B x+C x^2\right )}{\sqrt{a+b x} \sqrt{a c-b c x}} \, dx\)

Optimal. Leaf size=368 \[ -\frac{\left (a^2-b^2 x^2\right ) \left (f x \left (9 a^2 C f^2-b^2 \left (2 C e^2-4 f (3 A f+2 B e)\right )\right )+4 \left (4 a^2 f^2 (B f+2 C e)-b^2 e \left (C e^2-4 f (3 A f+B e)\right )\right )\right )}{24 b^4 f \sqrt{a+b x} \sqrt{a c-b c x}}+\frac{\sqrt{a^2 c-b^2 c x^2} \tan ^{-1}\left (\frac{b \sqrt{c} x}{\sqrt{a^2 c-b^2 c x^2}}\right ) \left (4 A \left (a^2 b^2 f^2+2 b^4 e^2\right )+a^2 \left (3 a^2 C f^2+4 b^2 e (2 B f+C e)\right )\right )}{8 b^5 \sqrt{c} \sqrt{a+b x} \sqrt{a c-b c x}}+\frac{\left (a^2-b^2 x^2\right ) (e+f x)^2 (C e-4 B f)}{12 b^2 f \sqrt{a+b x} \sqrt{a c-b c x}}-\frac{C \left (a^2-b^2 x^2\right ) (e+f x)^3}{4 b^2 f \sqrt{a+b x} \sqrt{a c-b c x}} \]

[Out]

((C*e - 4*B*f)*(e + f*x)^2*(a^2 - b^2*x^2))/(12*b^2*f*Sqrt[a + b*x]*Sqrt[a*c - b
*c*x]) - (C*(e + f*x)^3*(a^2 - b^2*x^2))/(4*b^2*f*Sqrt[a + b*x]*Sqrt[a*c - b*c*x
]) - ((4*(4*a^2*f^2*(2*C*e + B*f) - b^2*e*(C*e^2 - 4*f*(B*e + 3*A*f))) + f*(9*a^
2*C*f^2 - b^2*(2*C*e^2 - 4*f*(2*B*e + 3*A*f)))*x)*(a^2 - b^2*x^2))/(24*b^4*f*Sqr
t[a + b*x]*Sqrt[a*c - b*c*x]) + ((4*A*(2*b^4*e^2 + a^2*b^2*f^2) + a^2*(3*a^2*C*f
^2 + 4*b^2*e*(C*e + 2*B*f)))*Sqrt[a^2*c - b^2*c*x^2]*ArcTan[(b*Sqrt[c]*x)/Sqrt[a
^2*c - b^2*c*x^2]])/(8*b^5*Sqrt[c]*Sqrt[a + b*x]*Sqrt[a*c - b*c*x])

_______________________________________________________________________________________

Rubi [A]  time = 1.8231, antiderivative size = 369, normalized size of antiderivative = 1., number of steps used = 6, number of rules used = 6, integrand size = 40, \(\frac{\text{number of rules}}{\text{integrand size}}\) = 0.15 \[ -\frac{\left (a^2-b^2 x^2\right ) \left (4 \left (4 a^2 f^2 (B f+2 C e)-\frac{1}{4} b^2 \left (4 C e^3-16 e f (3 A f+B e)\right )\right )+f x \left (9 a^2 C f^2-b^2 \left (2 C e^2-4 f (3 A f+2 B e)\right )\right )\right )}{24 b^4 f \sqrt{a+b x} \sqrt{a c-b c x}}+\frac{\left (a^2-b^2 x^2\right ) (e+f x)^2 (C e-4 B f)}{12 b^2 f \sqrt{a+b x} \sqrt{a c-b c x}}-\frac{C \left (a^2-b^2 x^2\right ) (e+f x)^3}{4 b^2 f \sqrt{a+b x} \sqrt{a c-b c x}}+\frac{\sqrt{a^2 c-b^2 c x^2} \tan ^{-1}\left (\frac{b \sqrt{c} x}{\sqrt{a^2 c-b^2 c x^2}}\right ) \left (3 a^4 C f^2+4 A \left (a^2 b^2 f^2+2 b^4 e^2\right )+4 a^2 b^2 e (2 B f+C e)\right )}{8 b^5 \sqrt{c} \sqrt{a+b x} \sqrt{a c-b c x}} \]

Antiderivative was successfully verified.

[In]  Int[((e + f*x)^2*(A + B*x + C*x^2))/(Sqrt[a + b*x]*Sqrt[a*c - b*c*x]),x]

[Out]

((C*e - 4*B*f)*(e + f*x)^2*(a^2 - b^2*x^2))/(12*b^2*f*Sqrt[a + b*x]*Sqrt[a*c - b
*c*x]) - (C*(e + f*x)^3*(a^2 - b^2*x^2))/(4*b^2*f*Sqrt[a + b*x]*Sqrt[a*c - b*c*x
]) - ((4*(4*a^2*f^2*(2*C*e + B*f) - (b^2*(4*C*e^3 - 16*e*f*(B*e + 3*A*f)))/4) +
f*(9*a^2*C*f^2 - b^2*(2*C*e^2 - 4*f*(2*B*e + 3*A*f)))*x)*(a^2 - b^2*x^2))/(24*b^
4*f*Sqrt[a + b*x]*Sqrt[a*c - b*c*x]) + ((3*a^4*C*f^2 + 4*a^2*b^2*e*(C*e + 2*B*f)
 + 4*A*(2*b^4*e^2 + a^2*b^2*f^2))*Sqrt[a^2*c - b^2*c*x^2]*ArcTan[(b*Sqrt[c]*x)/S
qrt[a^2*c - b^2*c*x^2]])/(8*b^5*Sqrt[c]*Sqrt[a + b*x]*Sqrt[a*c - b*c*x])

_______________________________________________________________________________________

Rubi in Sympy [A]  time = 170.581, size = 337, normalized size = 0.92 \[ - \frac{C \sqrt{a + b x} \left (e + f x\right )^{3} \sqrt{a c - b c x}}{4 b^{2} c f} - \frac{\sqrt{a + b x} \left (e + f x\right )^{2} \left (4 B f - C e\right ) \sqrt{a c - b c x}}{12 b^{2} c f} - \frac{\sqrt{a + b x} \sqrt{a c - b c x} \left (48 A b^{2} e f^{2} + 16 B a^{2} f^{3} + 16 B b^{2} e^{2} f + 32 C a^{2} e f^{2} - 4 C b^{2} e^{3} + f x \left (2 b^{2} e \left (4 B f - C e\right ) + f^{2} \left (12 A b^{2} + 9 C a^{2}\right )\right )\right )}{24 b^{4} c f} + \frac{\sqrt{a + b x} \sqrt{a c - b c x} \left (4 A a^{2} b^{2} f^{2} + 8 A b^{4} e^{2} + 8 B a^{2} b^{2} e f + 3 C a^{4} f^{2} + 4 C a^{2} b^{2} e^{2}\right ) \operatorname{atan}{\left (\frac{b \sqrt{c} x}{\sqrt{a^{2} c - b^{2} c x^{2}}} \right )}}{8 b^{5} \sqrt{c} \sqrt{a^{2} c - b^{2} c x^{2}}} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]  rubi_integrate((f*x+e)**2*(C*x**2+B*x+A)/(b*x+a)**(1/2)/(-b*c*x+a*c)**(1/2),x)

[Out]

-C*sqrt(a + b*x)*(e + f*x)**3*sqrt(a*c - b*c*x)/(4*b**2*c*f) - sqrt(a + b*x)*(e
+ f*x)**2*(4*B*f - C*e)*sqrt(a*c - b*c*x)/(12*b**2*c*f) - sqrt(a + b*x)*sqrt(a*c
 - b*c*x)*(48*A*b**2*e*f**2 + 16*B*a**2*f**3 + 16*B*b**2*e**2*f + 32*C*a**2*e*f*
*2 - 4*C*b**2*e**3 + f*x*(2*b**2*e*(4*B*f - C*e) + f**2*(12*A*b**2 + 9*C*a**2)))
/(24*b**4*c*f) + sqrt(a + b*x)*sqrt(a*c - b*c*x)*(4*A*a**2*b**2*f**2 + 8*A*b**4*
e**2 + 8*B*a**2*b**2*e*f + 3*C*a**4*f**2 + 4*C*a**2*b**2*e**2)*atan(b*sqrt(c)*x/
sqrt(a**2*c - b**2*c*x**2))/(8*b**5*sqrt(c)*sqrt(a**2*c - b**2*c*x**2))

_______________________________________________________________________________________

Mathematica [A]  time = 0.685117, size = 202, normalized size = 0.55 \[ \frac{3 \sqrt{a-b x} \tan ^{-1}\left (\frac{b x}{\sqrt{a-b x} \sqrt{a+b x}}\right ) \left (3 a^4 C f^2+4 A \left (a^2 b^2 f^2+2 b^4 e^2\right )+4 a^2 b^2 e (2 B f+C e)\right )-b (a-b x) \sqrt{a+b x} \left (a^2 f (16 B f+32 C e+9 C f x)+2 b^2 \left (6 A f (4 e+f x)+4 B \left (3 e^2+3 e f x+f^2 x^2\right )+C x \left (6 e^2+8 e f x+3 f^2 x^2\right )\right )\right )}{24 b^5 \sqrt{c (a-b x)}} \]

Antiderivative was successfully verified.

[In]  Integrate[((e + f*x)^2*(A + B*x + C*x^2))/(Sqrt[a + b*x]*Sqrt[a*c - b*c*x]),x]

[Out]

(-(b*(a - b*x)*Sqrt[a + b*x]*(a^2*f*(32*C*e + 16*B*f + 9*C*f*x) + 2*b^2*(6*A*f*(
4*e + f*x) + 4*B*(3*e^2 + 3*e*f*x + f^2*x^2) + C*x*(6*e^2 + 8*e*f*x + 3*f^2*x^2)
))) + 3*(3*a^4*C*f^2 + 4*a^2*b^2*e*(C*e + 2*B*f) + 4*A*(2*b^4*e^2 + a^2*b^2*f^2)
)*Sqrt[a - b*x]*ArcTan[(b*x)/(Sqrt[a - b*x]*Sqrt[a + b*x])])/(24*b^5*Sqrt[c*(a -
 b*x)])

_______________________________________________________________________________________

Maple [A]  time = 0.036, size = 635, normalized size = 1.7 \[{\frac{1}{24\,{b}^{4}c}\sqrt{bx+a}\sqrt{-c \left ( bx-a \right ) } \left ( -6\,C{x}^{3}{b}^{2}{f}^{2}\sqrt{{b}^{2}c}\sqrt{-c \left ({b}^{2}{x}^{2}-{a}^{2} \right ) }+12\,{f}^{2}Ac{a}^{2}\arctan \left ({\frac{\sqrt{{b}^{2}c}x}{\sqrt{-c \left ({b}^{2}{x}^{2}-{a}^{2} \right ) }}} \right ){b}^{2}+24\,c\arctan \left ({\frac{\sqrt{{b}^{2}c}x}{\sqrt{-c \left ({b}^{2}{x}^{2}-{a}^{2} \right ) }}} \right ) A{e}^{2}{b}^{4}+24\,Bfec{a}^{2}\arctan \left ({\frac{\sqrt{{b}^{2}c}x}{\sqrt{-c \left ({b}^{2}{x}^{2}-{a}^{2} \right ) }}} \right ){b}^{2}-8\,B{x}^{2}{b}^{2}{f}^{2}\sqrt{{b}^{2}c}\sqrt{-c \left ({b}^{2}{x}^{2}-{a}^{2} \right ) }+9\,{a}^{4}C{f}^{2}c\arctan \left ({\frac{\sqrt{{b}^{2}c}x}{\sqrt{-c \left ({b}^{2}{x}^{2}-{a}^{2} \right ) }}} \right ) +12\,{e}^{2}Cc{a}^{2}\arctan \left ({\frac{\sqrt{{b}^{2}c}x}{\sqrt{-c \left ({b}^{2}{x}^{2}-{a}^{2} \right ) }}} \right ){b}^{2}-16\,C{x}^{2}{b}^{2}ef\sqrt{{b}^{2}c}\sqrt{-c \left ({b}^{2}{x}^{2}-{a}^{2} \right ) }-12\,{f}^{2}Ax\sqrt{-c \left ({b}^{2}{x}^{2}-{a}^{2} \right ) }{b}^{2}\sqrt{{b}^{2}c}-24\,Bfex\sqrt{-c \left ({b}^{2}{x}^{2}-{a}^{2} \right ) }{b}^{2}\sqrt{{b}^{2}c}-9\,{a}^{2}C{f}^{2}x\sqrt{-c \left ({b}^{2}{x}^{2}-{a}^{2} \right ) }\sqrt{{b}^{2}c}-12\,{e}^{2}Cx\sqrt{-c \left ({b}^{2}{x}^{2}-{a}^{2} \right ) }{b}^{2}\sqrt{{b}^{2}c}-48\,\sqrt{-c \left ({b}^{2}{x}^{2}-{a}^{2} \right ) }Aef{b}^{2}\sqrt{{b}^{2}c}-16\,{a}^{2}\sqrt{-c \left ({b}^{2}{x}^{2}-{a}^{2} \right ) }B{f}^{2}\sqrt{{b}^{2}c}-24\,\sqrt{-c \left ({b}^{2}{x}^{2}-{a}^{2} \right ) }B{e}^{2}{b}^{2}\sqrt{{b}^{2}c}-32\,{a}^{2}\sqrt{-c \left ({b}^{2}{x}^{2}-{a}^{2} \right ) }Cef\sqrt{{b}^{2}c} \right ){\frac{1}{\sqrt{-c \left ({b}^{2}{x}^{2}-{a}^{2} \right ) }}}{\frac{1}{\sqrt{{b}^{2}c}}}} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]  int((f*x+e)^2*(C*x^2+B*x+A)/(b*x+a)^(1/2)/(-b*c*x+a*c)^(1/2),x)

[Out]

1/24*(b*x+a)^(1/2)*(-c*(b*x-a))^(1/2)/c*(-6*C*x^3*b^2*f^2*(b^2*c)^(1/2)*(-c*(b^2
*x^2-a^2))^(1/2)+12*f^2*A*c*a^2*arctan((b^2*c)^(1/2)*x/(-c*(b^2*x^2-a^2))^(1/2))
*b^2+24*c*arctan((b^2*c)^(1/2)*x/(-c*(b^2*x^2-a^2))^(1/2))*A*e^2*b^4+24*B*f*e*c*
a^2*arctan((b^2*c)^(1/2)*x/(-c*(b^2*x^2-a^2))^(1/2))*b^2-8*B*x^2*b^2*f^2*(b^2*c)
^(1/2)*(-c*(b^2*x^2-a^2))^(1/2)+9*a^4*C*f^2*c*arctan((b^2*c)^(1/2)*x/(-c*(b^2*x^
2-a^2))^(1/2))+12*e^2*C*c*a^2*arctan((b^2*c)^(1/2)*x/(-c*(b^2*x^2-a^2))^(1/2))*b
^2-16*C*x^2*b^2*e*f*(b^2*c)^(1/2)*(-c*(b^2*x^2-a^2))^(1/2)-12*f^2*A*x*(-c*(b^2*x
^2-a^2))^(1/2)*b^2*(b^2*c)^(1/2)-24*B*f*e*x*(-c*(b^2*x^2-a^2))^(1/2)*b^2*(b^2*c)
^(1/2)-9*a^2*C*f^2*x*(-c*(b^2*x^2-a^2))^(1/2)*(b^2*c)^(1/2)-12*e^2*C*x*(-c*(b^2*
x^2-a^2))^(1/2)*b^2*(b^2*c)^(1/2)-48*(-c*(b^2*x^2-a^2))^(1/2)*A*e*f*b^2*(b^2*c)^
(1/2)-16*a^2*(-c*(b^2*x^2-a^2))^(1/2)*B*f^2*(b^2*c)^(1/2)-24*(-c*(b^2*x^2-a^2))^
(1/2)*B*e^2*b^2*(b^2*c)^(1/2)-32*a^2*(-c*(b^2*x^2-a^2))^(1/2)*C*e*f*(b^2*c)^(1/2
))/(-c*(b^2*x^2-a^2))^(1/2)/b^4/(b^2*c)^(1/2)

_______________________________________________________________________________________

Maxima [F]  time = 0., size = 0, normalized size = 0. \[ \text{Exception raised: ValueError} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]  integrate((C*x^2 + B*x + A)*(f*x + e)^2/(sqrt(-b*c*x + a*c)*sqrt(b*x + a)),x, algorithm="maxima")

[Out]

Exception raised: ValueError

_______________________________________________________________________________________

Fricas [A]  time = 0.271191, size = 1, normalized size = 0. \[ \left [-\frac{2 \,{\left (6 \, C b^{3} f^{2} x^{3} + 24 \, B b^{3} e^{2} + 16 \, B a^{2} b f^{2} + 16 \,{\left (2 \, C a^{2} b + 3 \, A b^{3}\right )} e f + 8 \,{\left (2 \, C b^{3} e f + B b^{3} f^{2}\right )} x^{2} + 3 \,{\left (4 \, C b^{3} e^{2} + 8 \, B b^{3} e f +{\left (3 \, C a^{2} b + 4 \, A b^{3}\right )} f^{2}\right )} x\right )} \sqrt{-b c x + a c} \sqrt{b x + a} \sqrt{-c} - 3 \,{\left (8 \, B a^{2} b^{2} c e f + 4 \,{\left (C a^{2} b^{2} + 2 \, A b^{4}\right )} c e^{2} +{\left (3 \, C a^{4} + 4 \, A a^{2} b^{2}\right )} c f^{2}\right )} \log \left (2 \, \sqrt{-b c x + a c} \sqrt{b x + a} b x +{\left (2 \, b^{2} x^{2} - a^{2}\right )} \sqrt{-c}\right )}{48 \, b^{5} \sqrt{-c} c}, -\frac{{\left (6 \, C b^{3} f^{2} x^{3} + 24 \, B b^{3} e^{2} + 16 \, B a^{2} b f^{2} + 16 \,{\left (2 \, C a^{2} b + 3 \, A b^{3}\right )} e f + 8 \,{\left (2 \, C b^{3} e f + B b^{3} f^{2}\right )} x^{2} + 3 \,{\left (4 \, C b^{3} e^{2} + 8 \, B b^{3} e f +{\left (3 \, C a^{2} b + 4 \, A b^{3}\right )} f^{2}\right )} x\right )} \sqrt{-b c x + a c} \sqrt{b x + a} \sqrt{c} - 3 \,{\left (8 \, B a^{2} b^{2} c e f + 4 \,{\left (C a^{2} b^{2} + 2 \, A b^{4}\right )} c e^{2} +{\left (3 \, C a^{4} + 4 \, A a^{2} b^{2}\right )} c f^{2}\right )} \arctan \left (\frac{b \sqrt{c} x}{\sqrt{-b c x + a c} \sqrt{b x + a}}\right )}{24 \, b^{5} c^{\frac{3}{2}}}\right ] \]

Verification of antiderivative is not currently implemented for this CAS.

[In]  integrate((C*x^2 + B*x + A)*(f*x + e)^2/(sqrt(-b*c*x + a*c)*sqrt(b*x + a)),x, algorithm="fricas")

[Out]

[-1/48*(2*(6*C*b^3*f^2*x^3 + 24*B*b^3*e^2 + 16*B*a^2*b*f^2 + 16*(2*C*a^2*b + 3*A
*b^3)*e*f + 8*(2*C*b^3*e*f + B*b^3*f^2)*x^2 + 3*(4*C*b^3*e^2 + 8*B*b^3*e*f + (3*
C*a^2*b + 4*A*b^3)*f^2)*x)*sqrt(-b*c*x + a*c)*sqrt(b*x + a)*sqrt(-c) - 3*(8*B*a^
2*b^2*c*e*f + 4*(C*a^2*b^2 + 2*A*b^4)*c*e^2 + (3*C*a^4 + 4*A*a^2*b^2)*c*f^2)*log
(2*sqrt(-b*c*x + a*c)*sqrt(b*x + a)*b*x + (2*b^2*x^2 - a^2)*sqrt(-c)))/(b^5*sqrt
(-c)*c), -1/24*((6*C*b^3*f^2*x^3 + 24*B*b^3*e^2 + 16*B*a^2*b*f^2 + 16*(2*C*a^2*b
 + 3*A*b^3)*e*f + 8*(2*C*b^3*e*f + B*b^3*f^2)*x^2 + 3*(4*C*b^3*e^2 + 8*B*b^3*e*f
 + (3*C*a^2*b + 4*A*b^3)*f^2)*x)*sqrt(-b*c*x + a*c)*sqrt(b*x + a)*sqrt(c) - 3*(8
*B*a^2*b^2*c*e*f + 4*(C*a^2*b^2 + 2*A*b^4)*c*e^2 + (3*C*a^4 + 4*A*a^2*b^2)*c*f^2
)*arctan(b*sqrt(c)*x/(sqrt(-b*c*x + a*c)*sqrt(b*x + a))))/(b^5*c^(3/2))]

_______________________________________________________________________________________

Sympy [F(-1)]  time = 0., size = 0, normalized size = 0. \[ \text{Timed out} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]  integrate((f*x+e)**2*(C*x**2+B*x+A)/(b*x+a)**(1/2)/(-b*c*x+a*c)**(1/2),x)

[Out]

Timed out

_______________________________________________________________________________________

GIAC/XCAS [F(-1)]  time = 0., size = 0, normalized size = 0. \[ \text{Timed out} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]  integrate((C*x^2 + B*x + A)*(f*x + e)^2/(sqrt(-b*c*x + a*c)*sqrt(b*x + a)),x, algorithm="giac")

[Out]

Timed out